#ifndef GND_MESSAGE_H
#define GND_MESSAGE_H

#include <gtk/gtk.h>


typedef struct
{
    gint len;
    gchar * data;
} GndMessageData;

typedef struct
{
    GQueue * message_data_list;
} GndMessage;

GndMessage * gnd_message_new();
GndMessage * gnd_message_new_with_data(gchar * data, gint len);         //用已编码的数据新建一个message
gint gnd_message_generate_bin(GndMessage * self, gchar ** out);
gboolean  gnd_message_free(GndMessage * message);
gboolean  gnd_message_add_data(GndMessage * self, GndMessageData * m_data);
gboolean  gnd_message_add_raw_data(GndMessage * self, gchar * data, gint len);
GndMessageData * gnd_message_data_new(gchar * data, gint len);
gboolean gnd_message_data_free(GndMessageData * m_data);

#endif
